package coffeenc.mall.common.api;

/**
 * 枚举了一些常用错误码
 * Created by coffeenc on 2020/9/9
 */
public enum ResultCode implements IErrorCode{
    SUCCESS(200,"成功"),
    FAILED(500,"失败"),
    FORBIDDEN(403,"无权访问"),
    UNAUTHORIZED(401,"未登录或token已过期");

    private int code;
    private String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
